package org.zhxy.entity.system;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.*;

import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Builder
@TableName("pe_user")
public class User implements Serializable {

    @TableId(type = IdType.ID_WORKER_STR)
    private String id;//√
    private String username; //√
    private String password;//√
    private String nickName;//√
    private String level; //saasAdmin：saas管理员具备所有权限  coAdmin：企业管理（创建租户企业的时候添加）user：普通用户（需要分配角色）//√
    private String telephone;//√
    private String email;//x
    private String sex; //1男 2女//√
    private String type;    //老师1,学生2//√
    private String idCard;//√
    private Date birthday;//√
    private String status;  //是否禁用该账号 1不禁用 2禁用//√

    private String province;  //省//√
    private String city; //市//√
    private String area; //区县//√
    private String township; //乡 镇//√
    private String detailed; //村//√

    private String education;   //学历//x
    private String graduationSchool; //毕业院校//√
    private String major;		//专业//x
    private String emergencyContact; //紧急联络人
    private String emergencyRelation; //紧急联络人关系
    private String url;

    private transient String roleIds; //在页面新增,修改用户时,传递过来的角色ids字符串,用于绑定关系


    private transient Set<Role> roles = new HashSet<Role>();
}
